﻿@using MealBooking.Core.Models.Accounts;
@model BalanceHistory
@{
    ViewBag.HeaderTitle = "Edit Balance and Credit";
    Layout = "../Shared/_Layout.cshtml";
    Customer customer = ViewBag.Customer;
}
<!--Navbar-->
<div data-role="navbar" data-iconpos="left">
    <div class="float-left">
        <div data-role="controlgroup" data-type="horizontal" data-inset="true" data-mini="true">
            <a href="@Url.Action("Detail", new { id = customer.Id })" data-role="button" data-theme="e">
                Cancel</a> <a href="@Url.Action("EditAccount", new { id = customer.Id })" data-role="button">
                    Edit User</a>
        </div>
    </div>
    @Html.Partial("_FloatRightPartial")
</div>
<!--Navbar End-->
@using (Html.BeginForm("EditCustomer", "AccountManager", FormMethod.Post))
{
    <input type="hidden" id="Account_Id" name="Account.Id" value="@customer.Id" />
    <ul data-role="listview" data-inset="true" data-mini="true">
        <li data-role="list-divider">@customer.Name</li>
        <li>Current Balance : @customer.Balance</li>
        <li>
            <div data-role="fieldcontain">
                @Html.LabelFor(b => b.Amount, "Amount : ")
                @Html.TextBoxFor(b => b.Amount)
            </div>
        </li>
        <li>
            <div data-role="fieldcontain">
                @Html.LabelFor(b => b.Comment, "Commnet : ")
                @Html.TextBoxFor(b => b.Comment)
            </div>
        </li>
        @*        <li>
            <div data-role="fieldcontain">
                @Html.LabelFor(c => c.Credit, "Credit : ")
                @Html.TextBoxFor(c => c.Credit, new { @value = customer.Credit })
            </div>
        </li>*@
    </ul>
    <ul data-role="listview" data-inset="true" data-mini="true">
        <li data-role="list-divider"></li>
        <li>
            <div class="ui-grid-a">
                <div class="ui-block-a">
                    <button type="submit">
                        Update</button>
                </div>
                <div class="ui-block-b">
                    <a href="@Url.Action("Detail", new { id = customer.Id })" data-role="button" data-theme="e">
                        Cancel</a>
                </div>
            </div>
        </li>
    </ul>
}